package cn.me.alphamq.common.config;

import cn.me.alphamq.common.constant.GlobalConstant;
import cn.me.alphamq.common.util.AssertUtil;

/**
 * 全局配置
 *
 * @author f
 */
public class GlobalProperties {

    /**
     * 读取环境变量中配置的 MQ 存储绝对路径地址
     */
    private static String alphaMqHome;

    static  {
        String alphaMqHome = System.getenv(GlobalConstant.ALPHA_MQ_HOME);
        AssertUtil.isNotNull(alphaMqHome, "ALPHA_MQ_HOME is null or empty");
        GlobalProperties.alphaMqHome = alphaMqHome;
    }

    public static String getAlphaMqHome() {
        return alphaMqHome;
    }
}
